/**
 * 
 */
package clids.ex2.filters;

import java.io.File;

/**
 * @author Li0r
 *
 */
public class GreaterThanFilter extends AbstractFilter {

	private static final int K_FACTOR = 1024;
	private double low;
	public GreaterThanFilter(String params) {
		super(params);
		low = Double.parseDouble(parameters[0]);
	}
	public GreaterThanFilter(double num){
		low = num;
	}
	@Override
	public boolean isValid(String file) {
		File fileInfo = new File(file);
		if((fileInfo.length() / K_FACTOR) >= low){
			return true;
		}
		return false;
	}

}
